Skip to content

build: migrate from Workers to Docker#204

Merged
MartinKolarik merged 5 commits into
masterfrom
docker
Jun 13, 2026
Merged

build: migrate from Workers to Docker#204
MartinKolarik merged 5 commits into
masterfrom
docker

Conversation

@MartinKolarik

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 70e4404a-e132-45d1-96a2-fe6e91db8553

📥 Commits

Reviewing files that changed from the base of the PR and between d48c22e and 20311dc.

📒 Files selected for processing (2)
  • nuxt.config.ts
  • server/plugins/cache-control.ts
✅ Files skipped from review due to trivial changes (1)
  • server/plugins/cache-control.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • nuxt.config.ts

Walkthrough

This PR removes Cloudflare Workers tooling and configuration, adds a multi-stage Dockerfile and .dockerignore for containerized builds, integrates Elastic APM (config module, constrained-memory init, packages, and start-script hooks), and updates Nuxt preview detection and robots rules to use Coolify environment variables.

Possibly related PRs

  • jsdelivr/globalping-dash#201: Directly conflicts with this PR—that PR adds Wrangler configuration and worker scripts that this PR removes entirely.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the migration rationale, key changes, and any migration notes for reviewers.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the primary change: migrating the deployment infrastructure from Cloudflare Workers to Docker.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docker

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
dash-globalping-io 20311dc Jun 13 2026, 10:22 PM

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
Dockerfile (1)

23-25: ⚡ Quick win

Define a HEALTHCHECK or remove unused curl installation.

The curl package is installed but no HEALTHCHECK instruction is defined in the Dockerfile. Either add a healthcheck to monitor container health or remove the curl installation to reduce image size.

🏥 Proposed healthcheck addition
 USER node

 EXPOSE 13010

+HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
+  CMD curl -f http://localhost:13010/ || exit 1
+
 CMD [ "node", "--experimental-loader", "elastic-apm-node/loader.mjs", "-r", "./elastic-apm-utils.cjs", "-r", "elastic-apm-node/start.js", ".output/server/index.mjs" ]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` around lines 23 - 25, The Dockerfile installs curl in the RUN
apt-get... command but no HEALTHCHECK is defined; either remove curl from that
RUN line to avoid the unused package or add a HEALTHCHECK instruction that uses
curl to probe the service (for example calling the container's HTTP health
endpoint) so the installed curl is used; update the RUN line to drop curl if
removing it, or add a HEALTHCHECK instruction referencing curl to validate
container health.
elastic-apm-node.cjs (1)

7-7: 💤 Low value

Overly restrictive log level may hide important errors.

Setting logLevel: 'fatal' means only fatal-level errors from the APM agent itself will be logged. This might hide important warnings or errors about instrumentation issues, connectivity problems, or configuration mistakes during startup.

Consider using 'error' or 'warn' for better visibility into APM agent behavior without excessive noise.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@elastic-apm-node.cjs` at line 7, The APM agent configuration currently sets
logLevel: 'fatal' which is too restrictive; update the logLevel property in the
configuration (the logLevel symbol in elastic-apm-node.cjs) from 'fatal' to a
less restrictive level such as 'error' or 'warn' to ensure warnings and errors
are surfaced during startup and instrumentation; make the change where the APM
config object is defined so the agent initializes with the new level.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@elastic-apm-node.cjs`:
- Line 9: The APM config currently sets captureExceptions: false which prevents
Elastic APM from recording unhandled exceptions; update the configuration in
elastic-apm-node.cjs to enable exception capture by changing captureExceptions
to true (or remove the override so the default true is used), ensuring Elastic
APM will record unhandled exceptions for observability; if there is custom error
handling, document why it remains false and consider enabling
captureUncaughtExceptions/captureUnhandledRejections via the same config keys.

In `@package.json`:
- Line 18: The start command duplication uses node --experimental-loader in
package.json "start" script and in the Dockerfile CMD; create a single
executable startup script (e.g., scripts/start-server.sh) that runs Node with
the approved flags (remove or centralize --experimental-loader if you choose to
avoid it) and update package.json "start" to invoke that script (or npm run
start -> sh scripts/start-server.sh) and change the Dockerfile CMD to call the
same script so both locations share one canonical startup entrypoint; update any
comments to note that experimental flags were intentionally removed or
centralized.

---

Nitpick comments:
In `@Dockerfile`:
- Around line 23-25: The Dockerfile installs curl in the RUN apt-get... command
but no HEALTHCHECK is defined; either remove curl from that RUN line to avoid
the unused package or add a HEALTHCHECK instruction that uses curl to probe the
service (for example calling the container's HTTP health endpoint) so the
installed curl is used; update the RUN line to drop curl if removing it, or add
a HEALTHCHECK instruction referencing curl to validate container health.

In `@elastic-apm-node.cjs`:
- Line 7: The APM agent configuration currently sets logLevel: 'fatal' which is
too restrictive; update the logLevel property in the configuration (the logLevel
symbol in elastic-apm-node.cjs) from 'fatal' to a less restrictive level such as
'error' or 'warn' to ensure warnings and errors are surfaced during startup and
instrumentation; make the change where the APM config object is defined so the
agent initializes with the new level.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f3a34b3-1cf6-4534-92a3-cd5c0ada3f18

📥 Commits

Reviewing files that changed from the base of the PR and between dd29f13 and 6e1d610.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • .dockerignore
  • .gitignore
  • Dockerfile
  • elastic-apm-node.cjs
  • elastic-apm-utils.cjs
  • nuxt.config.ts
  • package.json
  • wrangler.jsonc
💤 Files with no reviewable changes (2)
  • wrangler.jsonc
  • .gitignore

Comment thread elastic-apm-node.cjs Outdated
Comment thread package.json
@MartinKolarik MartinKolarik merged commit af39798 into master Jun 13, 2026
3 of 6 checks passed
@MartinKolarik MartinKolarik deleted the docker branch June 13, 2026 22:21
@MartinKolarik MartinKolarik restored the docker branch June 13, 2026 22:21
@MartinKolarik MartinKolarik deleted the docker branch June 13, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant